import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 分页列表
export function list (query) {
    return request({
        url: '/school/level/levelPage',
        method: 'get',
        params: query
    })
}

// 详情
export function getById (query) {
    return request({
        url: '/school/level/getById/' + query.id,
        method: 'get',
        params: query
    })
}

// 新增
export function add (data) {
    return request({
        url: '/school/level/add',
        method: 'post',
        data: data
    })
}

// 修改
export function edit (data) {
    return request({
        url: '/school/level/edit',
        method: 'put',
        data: data
    })
}

// 删除
export function deleteById (data) {
    return request({
        url: '/school/level/deleteById/' + data.id,
        method: 'delete',
        data
    })
}

// 获取该学校的等级列表
export function getLevelList (query) {
    return request({
        url: '/school/level/getList',
        method: 'get',
        params: query
    })
}

// 获取所有的等级列表
export function getListV2 (query) {
    return request({
        url: '/school/level/getListV2',
        method: 'get',
        params: query
    })
}

// 分页获取等级列表
export function levelPage (query) {
    return request({
        url: '/school/level/levelPage',
        method: 'get',
        params: query
    })
}